#ifndef CHATAIMODEL_HPP
#define CHATAIMODEL_HPP

#include<curl/curl.h>
#include<string>
#include<iostream>
#include"user.hpp"
#include"json.hpp"
using json = nlohmann::json;
using namespace std;

class ChatAIModel
{
public:
    ChatAIModel();
    // 聊天接口，传入用户请求数据，返回AI生成响应
    string chat(json &historyMsg);
    ~ChatAIModel();

private:
    
    
    // 返回值
    CURLcode res;
    // api接口
    std::string api_key;
    // 消息头
    curl_slist* headers;
    // 消息主体
    json request_body;
};


#endif